import Request from '@/utils/request.js'
let request = new Request().http
let rootPath = "/corp";

function getListByVo(param, pageVo = undefined) {
		if(pageVo	!= undefined){
			return request({
			    url: rootPath + "/getListByVo", //请求头
			    method: "POST", //请求方式
				data: {
					page: pageVo.page,
					size: pageVo.size,
					vo: JSON.stringify(param)
				}
			})
		}else{
			return request({
			    url: rootPath + "/getListByVo", //请求头
			    method: "POST", //请求方式
				data: {
					vo: JSON.stringify(param)
				}
			})
		}
    }
	
function getList() {
		return request({
		    url: rootPath + "/getAll", //请求头
		    method: "GET", //请求方式
		})
}

function getById(id) {
        return request({
            url: rootPath + "getById", //请求头
            method: "GET", //请求方式
			data: {
				id
			}
        })
    }
// 使用ES模块导出语法
export {
	getListByVo,
	getList,
	getById
}